package reader;


import java.util.Objects;

public class Reader {



    private String readername;
    private String readerid;

    public Reader(String readername, String readerid) {
        this.readername = readername;
        this.readerid = readerid;
    }

    public String getReadername() {
        return readername;
    }

    public void setReadername(String readername) {
        this.readername = readername;
    }

    public String getReaderid() {
        return readerid;
    }

    public void setReaderid(String readerid) {
        this.readerid = readerid;
    }

    @Override
    public String toString() {
        return "读者号:"+readerid+"   读者名字:"+readername;

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
       Reader reader = (Reader) o;
        return Objects.equals(readerid, reader.readerid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(readerid);
    }
}